import request from '../utils/request'

const api_userInfo = '/admin/user/userInfo'

// 获取用户列表
export function getUserInfoPage(pageNum, pageSize, data) {
  return request({
    url: `${api_userInfo}/page/${pageNum}/${pageSize}`,
    method: 'post',
    data
  })
}

// 锁定用户
export function lockedUser(userId, status) {
  return request({
    url: `${api_userInfo}/lock/${userId}/${status}`,
    method: 'post'
  })
}

// 根据id查询用户
export function getUserInfoDetails(id) {
  return request({
    url: `${api_userInfo}/show/${id}`,
    method: 'get'
  })
}

// 用户认证
export function approveUserInfo(userId, authStatus) {
  return request({
    url: `${api_userInfo}/approval/${userId}/${authStatus}`,
    method: 'get'
  })
}
